import { Body, Controller, Get, Post, Res, Query } from '@nestjs/common';
import { Response } from 'express';
import { RejectReasonService } from './rejectReason.service';
import { apibefore } from 'src/router';

@Controller(apibefore('/reject_reason_manager'))
export class RejectReasonControllerManager {
  constructor(private readonly service: RejectReasonService) {}

  @Get('/findAll_ByType')
  async findAll_ByType(@Query() params){
    let result = await this.service.findAll_ByType(params.type)
    return result.map(e => {
      return {
        id: e.id,
        name: e.reason
      }
    })
  }
}
